]> dgit.raspbian.org Git - rust-debcargo.git/commitdiff
fix-test-tmpdir
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Sat, 4 Jul 2026 13:27:18 +0000 (13:27 +0000)
committerPeter Michael Green <plugwash@debian.org>
Sat, 4 Jul 2026 13:27:18 +0000 (13:27 +0000)
commit 87b5189176cd3ba3929cc827560ca10aa2198b89
Author: Fabian Grünbichler <git@fabian.gruenbichler.email>
Date:   Sat Jun 6 23:25:23 2026 +0200

    tests: skip overlay=cwd test in package build context

    just like the other local crate tests - until we find a way to make them
    robust.

Signed-off-by: Fabian Grünbichler <git@fabian.gruenbichler.email>
Gbp-Pq: Name fix-test-tmpdir.patch

tests/local-crate.rs

index 054a5ec9c7f443bfcb57a579edb9355ddab701aa..9626b72aa774fae1bfbb36f573fc75c595473c97 100644 (file)
@@ -60,10 +60,13 @@ fn generate_package_with_semver_crate_src() {
 
 #[test]
 fn overlay_bail_with_recursive_copy() {
-    let tmp = tempfile::tempdir().unwrap();
+    let tmp = tempfile::tempdir_in(Path::new(env!("CARGO_TARGET_TMPDIR"))).unwrap();
     let manifest_dir = env!("CARGO_MANIFEST_DIR");
 
     let foobar_path = Path::new(manifest_dir).join("tests").join("foobar");
+    if !foobar_path.exists() {
+        return;
+    }
     let config_content = format!(
         r#"overlay = "."
 crate_src_path = "{}"